package net.quanter.demo.junit5.basic.foos;

import java.util.HashSet;
import java.util.Set;

/***
 * 待测试的类二
 * 2020-06-03
 * @author harley-dog
 *
 */
public class FooService2 {

    private Set<String> set = new HashSet<String>();

    public int getSize(){
        return set.size();
    }

    public int add(String string){
        set.add(string);
        return set.size();
    }

    public boolean remove(String string){
        if(set.contains(string)){
            set.remove(string);
            return true;
        }
        return false;
    }

    public void clear(){
        set.clear();
    }

}
